package zzy.fast.widget;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import zzy.fast.R;

/***
 *
 * 功能描述: TODO
 *
 * @author zzy
 *
 *  2019-11-04 09:21
 *
 ***/
public class CustomToast {

    public static void show(Context context, String message) {
        Toast toast = new Toast(context);
        View view = LayoutInflater.from(context).inflate(R.layout.toast, null);
        TextView textView = view.findViewById(R.id.toastMsg);
        textView.setText(message);
        toast.setView(view);
        toast.setDuration(Toast.LENGTH_SHORT);
        toast.show();
    }
}
